﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MMITIntegration
{
    public class RandomStringHelper
    {
        /// <summary>
        /// generates a random string of digits of a specified length
        /// </summary>
        /// <param name="length"></param>
        /// <returns></returns>
        public static string GenerateStringWithDigits(int length)
        {
            StringBuilder builder = new StringBuilder();
            Random random = new Random((int)DateTime.Now.TimeOfDay.TotalSeconds);

            for (int i = 0; i < length; i++)
            {
                string digit = random.Next(9).ToString();
                builder.Append(digit);
            }

            string randomString = builder.ToString();

            return randomString;
        }
    }
}
